import Layout from "@/layout";
import levels from "@/views/levels";

const warehouseRouter = {
  path: "/warehouse/delivery",
  component: Layout,
  redirect: "noRedirect",
  name: "warehouse",
  alwaysShow: true,
  hidden: false,
  meta: {
    title: "库房管理",
    abbre: "库房",
    icon: "left_menu_warehouse",
    navigation: "/warehouse",
    id: "407"
  },
  children: [
    {
      path: "/warehouse/delivery",
      component: () => import("@/views/warehouse/warehouseDelivery"),
      name: "warehouse_delivery",
      hidden: false,
      meta: {
        title: "发货出库",
        noCache: true,
        navigation: "/warehouse/delivery",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/receipt",
      component: () => import("@/views/warehouse/warehouseReceipt"),
      name: "warehouse_receipt",
      hidden: false,
      meta: {
        title: "入库管理",
        noCache: true,
        navigation: "/warehouse/receipt",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/receipt/add",
      component: () => import("@/views/warehouse/warehouseReceipt_add"),
      hidden: true,
      name: "warehouse_receipt_add",
      meta: {
        title: "创建入库单",
        bread: "入库管理,创建入库单",
        noCache: true,
        navigation: "/warehouse/receipt",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/receipt/see/:id",
      component: () => import("@/views/warehouse/warehouseReceipt_see"),
      hidden: true,
      name: "warehouse_receipt_see",
      meta: {
        title: "查看入库单",
        bread: "入库管理,查看入库单",
        noCache: true,
        navigation: "/warehouse/receipt",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/receipt/edit/:id",
      component: () => import("@/views/warehouse/warehouseReceipt_edit"),
      hidden: true,
      name: "warehouse_receipt_edit",
      meta: {
        title: "审核入库单",
        bread: "入库管理,审核入库单",
        noCache: true,
        navigation: "/warehouse/receipt",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/withdrawal",
      component: () => import("@/views/warehouse/warehouseWithdrawal"),
      name: "warehouse_withdrawal",
      hidden: false,
      meta: {
        title: "出库管理",
        noCache: true,
        navigation: "/warehouse/withdrawal",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/withdrawal/add",
      component: () => import("@/views/warehouse/warehouseWithdrawal_add"),
      hidden: true,
      name: "warehouse_withdrawal_add",
      meta: {
        title: "创建出库单",
        bread: "出库管理,创建出库单",
        noCache: true,
        navigation: "/warehouse/withdrawal",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/withdrawal/see/:id",
      component: () => import("@/views/warehouse/warehouseWithdrawal_see"),
      hidden: true,
      name: "warehouse_withdrawal_see",
      meta: {
        title: "查看出库单",
        bread: "出库管理,查看出库单",
        noCache: true,
        navigation: "/warehouse/withdrawal",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/check",
      component: () => import("@/views/warehouse/warehouseCheck"),
      name: "warehouse_check",
      hidden: false,
      meta: {
        title: "库存盘点",
        noCache: true,
        navigation: "/warehouse/check",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/check/quick",
      component: () => import("@/views/warehouse/warehouseCheck_quick"),
      name: "warehouse_check_quick",
      hidden: true,
      meta: {
        title: "快捷盘点",
        bread: "库存盘点,快捷盘点",
        noCache: true,
        navigation: "/warehouse/check",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/check/add",
      component: () => import("@/views/warehouse/warehouseCheck_add"),
      name: "warehouse_check_add",
      hidden: true,
      meta: {
        title: "创建盘点单",
        bread: "库存盘点,创建盘点单",
        noCache: true,
        navigation: "/warehouse/check",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/check/edit/:id",
      component: () => import("@/views/warehouse/warehouseCheck_edit"),
      name: "warehouse_check_edit",
      hidden: true,
      meta: {
        title: "审核盘点单",
        bread: "库存盘点,审核盘点单",
        noCache: true,
        navigation: "/warehouse/check",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/check/see/:id",
      component: () => import("@/views/warehouse/warehouseCheck_see"),
      name: "warehouse_check_see",
      hidden: true,
      meta: {
        title: "查看盘点单",
        bread: "库存盘点,查看盘点单",
        noCache: true,
        navigation: "/warehouse/check",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/loss",
      component: () => import("@/views/warehouse/warehouseLoss"),
      name: "warehouse_loss",
      hidden: false,
      meta: {
        title: "报损报溢",
        noCache: true,
        navigation: "/warehouse/loss",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/loss/add",
      component: () => import("@/views/warehouse/warehouseLoss_add"),
      name: "warehouse_loss_add",
      hidden: true,
      meta: {
        title: "库存调整",
        bread: "报损报溢,库存调整",
        noCache: true,
        navigation: "/warehouse/loss",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/loss/see/:id",
      component: () => import("@/views/warehouse/warehouseLoss_see"),
      name: "warehouse_loss_see",
      hidden: true,
      meta: {
        title: "查看报损报溢",
        bread: "报损报溢,查看报损报溢",
        noCache: true,
        navigation: "/warehouse/loss",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/loss/edit/:id",
      component: () => import("@/views/warehouse/warehouseLoss_edit"),
      name: "warehouse_loss_edit",
      hidden: true,
      meta: {
        title: "审核报损报溢",
        bread: "报损报溢,审核报损报溢",
        noCache: true,
        navigation: "/warehouse/loss",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/allocation",
      component: () => import("@/views/warehouse/warehouseAllocation"),
      name: "warehouse_allocation",
      hidden: false,
      meta: {
        title: "SKU调拨",
        noCache: true,
        navigation: "/warehouse/allocation",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/now",
      component: () => import("@/views/warehouse/warehouseNow"),
      name: "warehouse_now",
      hidden: false,
      meta: {
        title: "当前库存",
        noCache: true,
        navigation: "/warehouse/now",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/now/record",
      component: () => import("@/views/warehouse/warehouseNow_record"),
      name: "warehouse_now_record",
      hidden: true,
      meta: {
        title: "操作记录",
        bread: "当前库存,操作记录",
        noCache: true,
        navigation: "/warehouse/now",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/records",
      component: () => import("@/views/warehouse/warehouseRecords"),
      name: "warehouse_records",
      hidden: false,
      meta: {
        title: "库存记录",
        noCache: false,
        navigation: "/warehouse/records",
        icon: "menu_big_data"
      }
    },

    {
      path: "/warehouse/stock/detail",
      component: () => import("@/views/warehouse/warehouseDetail"),
      hidden: true,
      name: "warehouse_records_detail",
      meta: {
        title: "查看明细",
        bread: "库存记录,查看明细",
        noCache: true,
        navigation: "/warehouse/records",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/stock",
      component: () => import("@/views/warehouse/warehouseStock"),
      name: "warehouse_stock",
      hidden: false,
      meta: {
        title: "期初库存",
        noCache: true,
        navigation: "/warehouse/stock",
        icon: "menu_big_data"
      }
    },

    {
      path: "/warehouse/stock/quick",
      component: () => import("@/views/warehouse/warehouseStock_quick"),
      name: "warehouse_stock_quick",
      hidden: true,
      meta: {
        title: "快捷设置",
        bread: "期初库存,快捷设置",
        noCache: true,
        navigation: "/warehouse/stock",
        icon: "menu_big_data"
      }
    },

    // 周转记录
    {
      path: "/warehouse/turnOverList",
      component: levels,
      name: "turnover",
      hidden: false,
      meta: {
        title: "周转商品",
        noCache: true,
        navigation: "/warehouse/turnOverList",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/warehouse/turnOverList",
          component: () => import("@/views/warehouse/turnoverGoods_list"),
          name: "turnover_goods_list",
          hidden: true,
          meta: {
            title: "物品列表",
            noCache: true,
            navigation: "/warehouse/turnOverList",
            icon: "menu_big_data"
          }
        },
        {
          path: "/warehouse/turnOverRecord",
          component: () => import("@/views/warehouse/turnoverGoods_record"),
          name: "turnover_goods_record",
          hidden: true,
          meta: {
            title: "周转记录",
            noCache: true,
            navigation: "/warehouse/turnOverList",
            icon: "menu_big_data"
          }
        },
        {
          path: "/warehouse/turnOverBack",
          component: () => import("@/views/warehouse/turnoverGoods_back"),
          name: "turnover_goods_back",
          hidden: true,
          meta: {
            title: "未还统计",
            noCache: true,
            navigation: "/warehouse/turnOverList",
            icon: "menu_big_data"
          }
        },
        {
          path: "/warehouse/turnOverRecord/see/:id",
          component: () => import("@/views/warehouse/turnoverGoods_record_see"),
          name: "turnover_goods_record_see",
          hidden: true,
          meta: {
            title: "周转记录",
            bread: "周转记录,查看",
            noCache: true,
            navigation: "/warehouse/turnOverList",
            icon: "menu_big_data",
            treeMenuHidden: true
          }
        }
        // {
        //   path: "/sorting/processOrder/see/:id",
        //   component: () => import("@/views/sorting/processOrder_see"),
        //   name: "process_order_see",
        //   hidden: true,
        //   meta: {
        //     title: "加工单",
        //     bread: "加工单,查看",
        //     noCache: true,
        //     navigation: "/sorting/processPlan",
        //     icon: "menu_big_data",
        //     treeMenuHidden: true
        //   }
        // }
      ]
    },

    {
      path: "/warehouse/batch",
      component: () => import("@/views/warehouse/warehouseBatch"),
      name: "warehouse_batch",
      hidden: false,
      meta: {
        title: "批次管理",
        noCache: true,
        navigation: "/warehouse/batch",
        icon: "menu_big_data"
      }
    },
    {
      path: "/warehouse/batch/see/:id",
      component: () => import("@/views/warehouse/warehouseBatch_see"),
      hidden: true,
      name: "warehouse_batch_see",
      meta: {
        title: "查看",
        bread: "批次管理,查看批次",
        noCache: true,
        navigation: "/warehouse/batch",
        icon: "menu_big_data"
      }
    },

  ]
};

export default warehouseRouter;
